﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="../common/base.jsp"%>
<title>入库页</title>
<link rel="stylesheet" type="text/css"
	href="${ctx}/staticweb/css/index.css">
<script type="text/javascript">
	$(function() {
		var addresult = $("#addRst").val();
		if (addresult) {
			if (addresult == '1') {
				alert("入库成功");
			} else {
				alert("入库失败");
			}
		}

/* 		$("#addBtn").on("click", function() {
			$("form").submit();
		}); */
		$("#cancelBtn").on("click", function() {
			$("input[type='text']").val("");
		});
	});
	
	function confun(){
		var xx = true;
		$("input[check='notnull']").each(function(){
			if(!$(this).val()){
				alert("不能为空");
				xx = false;
				return false;
			}
		});
		
		if(xx && confirm("是否确认入库")){
			$("form").submit();
			return true;
		}else{
			return false;
		}
	}
</script>
</head>
<body class="mian_bj">
	<form action="${ctx}/store/addGoods.do" method="post">
		<div class="mian_top_01">
			<div class="mian_top_r"></div>
			<div class="mian_top_l"></div>
			<div class="mian_b">
				<table width="100%" border="0" cellpadding="0" cellspacing="0"
					class="mian_b_bg_xz">
					<tr>
						<td width="5%" class="mian_b_bg_lm">&nbsp;</td>
						<td colspan="3" class="mian_b_bg_lm">添加货物信息</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td width="7%" valign="top">品牌：</td>
						<td width="60%"><input check="notnull" type="text" class="input_01"
							name="brand" id="textfield" maxlength="50"></td>
						<td width="25%">&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td valign="top">型号：</td>
						<td><input type="text" check="notnull" class="input_01" name="model"
							id="textfield" maxlength="50"></td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td valign="top">颜色：</td>
						<td><input type="text" check="notnull" class="input_01" name="color"
							id="textfield" maxlength="20"></td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td valign="top">尺码：</td>
						<td><input type="text" check="notnull" class="input_01" name="size"
							id="textfield" maxlength="10"></td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td valign="top">件数：</td>
						<td><input type="text" check="notnull" class="input_01" name="count"
							id="textfield" maxlength="10"></td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td valign="top">单价：</td>
						<td><input type="text" class="input_01" name="price"
							id="textfield" maxlength="7"></td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td valign="top">供货商：</td>
						<td><input type="text" class="input_01" name="supplier"
							id="textfield" maxlength="50"></td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td valign="top">到货时间：</td>
						<td><input type="text" class="input_01" name="arrivalTime"
							id="textfield">*格式2017-06-10</td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>
							<div align="center">
								<input onclick="confun()" type="button" value="确认提交" style="cursor: pointer;">
								<input id="cancelBtn" type="button" value="取消返回" style="cursor: pointer;">
							</div>
						</td>
						<td>&nbsp;</td>
					</tr>
<%--                     <tr>
                        <td>&nbsp;</td>
                        <td>&nbsp;</td>
                        <td>
                            <div align="center">
                                <a href="Branch.html"><img src="${ctx}/staticweb/images/bnt_03.gif"
                                    style="margin-right: 10px;" width="80" height="22"></a><a
                                    href="Branch.html"><img src="${ctx}/staticweb/images/bnt_05.gif" alt=""
                                    width="80" height="22"></a>
                            </div>
                        </td>
                        <td>&nbsp;</td>
                    </tr> --%>
				</table>
			</div>
		</div>
	</form>
	<input type="hidden" id="addRst" value=${result}>
</body>
</html>
